home *** CD-ROM | disk | FTP | other *** search
/ Windows 6-Pak - Disc 5 / Windows 6-Pak (InfoMagic) (Disc 5) (1999).ISO / Scripting-Tools / js15full.exe / Confirm.ht_ / Confirm.ht
Encoding:
Text File  |  1998-04-02  |  2.0 KB  |  62 lines

  1. <html>
  2.  
  3. <head><script language="JavaScript">
  4. <!----------
  5.  
  6. //=====================================================
  7. // Java Script code by Java Script It!   www.computan.on.ca/~todd/JavaScriptIt!
  8. //=====================================================
  9.  
  10. function confirmIt 
  11. (dbMsg,okURL,cancelURL,aOkMsg,aCancelMsg,okTyp,cancelTyp,okWin,cancelWin) {
  12.     if (confirm (dbMsg)) {
  13.         if (okTyp=="u"){
  14.             if(okWin=="Self") location.href=okURL;
  15.             if(okWin=="Parent") parent.location.href=okURL;
  16.         }
  17.         else {
  18.             alert(aOkMsg);
  19.         }
  20.     }
  21.     else {
  22.         if (cancelTyp=="u") {
  23.             if(cancelWin=="Self") location.href=cancelURL;
  24.             if(cancelWin=="Parent") parent.location.href=cancelURL;
  25.         }
  26.         else {
  27.             alert(aCancelMsg);
  28.         }
  29.     }
  30. }
  31.  
  32. //--------->
  33. </script>
  34.  
  35. <title>Confirm</title>
  36. </head>
  37.  
  38. <body bgColor="#FFFFFF" text="000000">
  39.  
  40. <div align=center><font size=6 font="Arial"><b>Confirm</b></font></div><p>
  41.  
  42. Below are some of the possibilities that you can perform with the Confirm application..<p>
  43.  
  44. 1. Click this <a href="JavaScript: confirmIt('Press Ok for more information on Java Script It!','','','written by Todd Climenhage','What is the matter? Not interesting enough.','a','a','Self','Self')">hyperlink</a> for a  question.<p>
  45.  
  46. 2. Click this <a href="JavaScript: confirmIt('Go to Animations example?','animat.htm','confirm.htm','','','u','u','Self','Self')">hyperlink</a> for a decision of whether to leave page or not.<p>
  47.  
  48. 3. Click the form button for another decision of whether to leave page or not.
  49. <form><input type=button value="Click Here" onClick="confirmIt('Go to Combo Links example','combo.htm','','','You should have gone!','u','a','Self','Self')"></form><p>
  50.  
  51. <b>Browser Compatibility</b><br>
  52. ò Works fully in Netscape Navigator 2.01 and higher<br>
  53. ò Works fully in Microsoft Internet Explorer 3.0 and higher<br>
  54. ò Old browsers may display the button as text because they do not understand form buttons (that is if you choose to make a button)
  55.  
  56.  
  57. </body>
  58.  
  59.  
  60. </html>
  61.  
  62.